package game.goods;

import game.controller.Supplies;

import static game.basic.GameBase.*;
import static game.main.GameApp.gameMusic;
import static game.main.GameApp.player;
import static game.main.GamePanel.ui;
import static game.main.GamePanel.gameState;

public class Obj_Potion_Red extends Supplies {


    public Obj_Potion_Red() {
        type="potion_red";
        name="红色药水";
        readObjImage("/object/potion_red.png",tileSize,tileSize);
        description="[红色药水]\n回复你的生命值";
    }


    public void use(){
        gameState=dialogueState;
        ui.currentDialogue="你使用的红色药水,你的生命值恢复了";
        player.hp+=3;
        if (player.hp>player.maxHp){
            player.hp=player.maxHp;
        }
        gameMusic.playSE(2);
    }

}
